#include <iostream>
#include <string>
#include <rapidcsv.h>
#include <fmt/format.h>
using namespace std;

int main()
{
    rapidcsv::Document document{ "accounts.csv" };
    std::vector<int> accounts{ document.GetColumn<int>("account") };
    std::vector<std::string> names{ document.GetColumn<std::string>("name") };
    std::vector<double> balance{ document.GetColumn<double>("balance") };

    std::cout << fmt::format("{:<10}{:<13}{:>7}\n", "Account", "Name", "Balance");
    for (std::size_t i{ 0 }; i < accounts.size(); ++i)
    {
        std::cout << fmt::format("{:<10}{:<13}{:>7.2f}\n", accounts.at(i), names.at(i), balance.at(i));
    }
    return 0;
}
